<script src="<?php echo $html->url(DS.'newsletters'.DS.'js'.DS.'jquery-ui-personalized-1.5.2.packed.js');?>"></script>
<script src="<?php echo $html->url(DS.'newsletters'.DS.'js'.DS.'sprinkle.js');?>"></script>
<h2> Configure Email Templates </h2>
<hr />
<?php echo $form->create('Email', array('action' => 'admin_edit'));?>
<?php echo $form->input('template'); ?>
<br />
<?php echo $form->end(__('Modify'));?>


<?php  if(isset($template)) { ?>
<div class="newsletter form">
<?php echo $form->create('Email', array('action' => 'admin_edit'));?>
	<fieldset>
 		<legend><?php __('Edit Email template');?></legend>
	
		<div id="tabvanilla" class="widget">
			<?php  if(isset($body_html))
			{ ?>
		    <div id="popular" class="tabdiv">
			<?php echo $form->input('body_html', array('type'=>'textarea', 'rows'=>10, 'cols'=>'50', 'value'=> $body_html)); ?>
		    </div><!--/html-->
		    <?php  } ?>
			
			<?php  if(isset($body_text))
				{ ?>
		    <div id="recent" class="tabdiv">
			<?php echo $form->input('body_text', array('type'=>'textarea', 'rows'=>10, 'cols'=>'50', 'value'=> $body_text)); ?>
		    </div><!--/text-->
			<?php  } ?>
			<?php  echo $form->input('template', array('type'=>'hidden', 'value'=>$template)); ?>
		</div><!--/widget-->
	
	</fieldset>
<?php echo $form->end(__('Submit'));?>
</div>
<?php  } ?>
